<?php
$this->title = '期刊资源';
$this->registerCss("
	.page-resource{margin:0 auto;padding:60px 12%;}
	.resource-list-item{margin-top:15px;}
	.resource-list-item .title{margin-top: 20px;color:#333;text-align: center;font-weight: 500;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;overflow: hidden;}
	.resource-list-item img{
        cursor: pointer;
        transition: all 0.5s;
    }
    .resource-list-item img:hover{
        transform: scale(1.1);
    }
    .pagination > .active > a, .pagination > .active > span, .pagination > .active > a:hover, .pagination > .active > span:hover, .pagination > .active > a:focus, .pagination > .active > span:focus {
        background-color: #F6C900;
        border-color: #F6C900;
    }
    .pagination > li > a, .pagination > li > span {
        color: #F6C900;
    }
    .pagination > .disabled > span, .pagination > .disabled > span:hover, .pagination > .disabled > span:focus, .pagination > .disabled > a, .pagination > .disabled > a:hover, .pagination > .disabled > a:focus {
        color: #F6C900;
    }
");
$per_url = Yii::$app->params['imgurl'];
?>

<div class="page-resource">
    <div style="border:1px solid #ccc;">
        <div style="padding: 10px 15px;background: #f3f2f2;">
            <p style="margin-bottom: 0px;font-size: 16px"><span style="padding: 0 3px;background: #F6C900;margin-right: 10px"></span>期刊资源</p>
        </div>

        <div class="resource-list" style="padding: 10px 15px;">
            <div class="row">
                <?php foreach ($list as $v){ ?>
                    <a href="/resource/<?=$v['id']?>.html">
                        <div class="col-lg-2 col-md-3">
                            <div class="resource-list-item">
                                <div>
                                    <img src="/img/120-160.png" alt="" style="width:100%; background:url(<?=$per_url . $v['image_path']?>); background-size:cover;border: 1px solid #E6E6E6;border-radius: 6px;">
                                </div>
                                <p class="title"><?=$v['title']?></p>
                            </div>
                        </div>
                    </a>
                <?php }?>
            </div>
            <div class="text-center"> <?= \yii\widgets\LinkPager::widget(['pagination' => $pages,
                    'firstPageLabel'=>"共 ".$count." 数据 | 首页",
                    'prevPageLabel'=>'上一页',
                    'nextPageLabel'=>'下一页',
                    'lastPageLabel'=>'末页',
                ]);
                ?></div>
        </div>
    </div>


</div>

